package c.w.taxi;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import com.www.taxi.R;

public class WhereActivity extends Activity implements c.w.ui.WiperSwitch.OnChangedListener {
	//private Window window = null;
    
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_where);
		
		//实例化WiperSwitch
        c.w.ui.WiperSwitch wiperSwitch = (c.w.ui.WiperSwitch)findViewById(R.id.wiperSwitch1);
        
        //设置初始状态为false
        wiperSwitch.setChecked(false);
        
        //设置监听
        wiperSwitch.setOnChangedListener(this);
	}
	/*
	public void windowDeploy(int x, int y){
    	 window = getWindow(); //�õ��Ի���
         //window.setWindowAnimations(R.style); //���ô��ڵ�������
         //window.setBackgroundDrawableResource(R.color.vifrification); //���öԻ��򱳾�Ϊ͸��
        WindowManager.LayoutParams wl = window.getAttributes();
         //���x��y������ô�����Ҫ��ʾ��λ��
         wl.x = x; //xС��0���ƣ�����0����
         wl.y = y; //yС��0���ƣ�����0����  
         wl.width = LayoutParams.FILL_PARENT;
         wl.height = LayoutParams.WRAP_CONTENT;
         //wl.alpha = 0.6f; //����͸����
         //wl.gravity = Gravity.BOTTOM; //������������
         window.setAttributes(wl);
       }*/

	@Override
	public void OnChanged(c.w.ui.WiperSwitch wiperSwitch, boolean checkState) {
		// TODO Auto-generated method stub
		Log.e("log", "" + checkState);
	}
}
